package com.tianqu.tms.entity;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.core.util.DateUtil;
import com.tianqu.tms.core.util.StringUtil;
import com.tianqu.tms.dao.RentalContractDao;
import com.tianqu.tms.dao.TmsDao;
import com.tianqu.tms.dao.ViewListDao;
import com.tianqu.tms.dto.RentalInfoDto;

public class RentalContractInfo extends ViewListManager {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4125865477339799498L;
	private String annualTransactionVolume;
	private int rowNo;
	private long id;
	private String serial;// 合同编号
	private String locationSerial;// 租位编号
	private int rent;// 租金
	private Timestamp startDate;// 合同开始日期
	private Timestamp endDate;// 合同结束日期
	private String ownerName;// 合同人姓名
	private int ownerSex;// 合同人性别
	private Timestamp ownerBirthday;// 合同人生日
	private String ownerPhone;// 合同人手机号码
	private String ownerIdCardNo;// 合同人身份证号
	private String ownerAddress;// 合同人住址
	private String remark;// 备注
	private int status;// 合同状态
	private Timestamp insertTime;// 插入时间
	private Timestamp updateTime;// 更新时间
	private int insertUserId;// 插入用户ID
	private int updateUserId;// 更新用户ID
	private int rentalType;// 租位类型
	private int acreage;// 租位面积
	private int carPort;// 车位数量
	// private int rentalStatus;//租位状态
	private int rentalArea;// 租位区域
	private String rentalAreaName;// 租位区域
	private String contractStatus;//
	private int cssFlag;// 样式标识
	private int handleType;// 操作类型
	private String handleTypeName;// 操作类型
	private String handleName;// 操作人姓名
	private String handleDate;// 操作日期

	/**
	 * 图片
	 */
	private String photo_1;
	private String photo_2;
	private String photo_3;
	private String photo_4;
	private String photo_5;
	private String photo_6;
	private String photo_7;
	private String photo_8;

	private String locationType;
	private String address;
	private String startTime;
	private String endTime;
	private int num;
	private String rentalAcreage;
	private String rentalCarPort;

	public static RentalContractInfo getInstance() {
		RentalContractInfo rentalContractInfo = new RentalContractInfo();
		rentalContractInfo.setExisting(false);
		return rentalContractInfo;
	}

	/**
	 * 插入市场租赁合同信息表
	 */
	public void insertContractInfo(RentalContractInfo info) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		RentalInfoDto dto = new RentalInfoDto();
		dto = setDtoFromEntity(dto, info);
		// 插入市场租赁合同信息表
		rentalDao.insertContractInfo(dto);
	}

	/**
	 * 插入租赁合同操作记录表
	 */
	public void insertContractUpdateHistroy(RentalContractInfo info) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		RentalInfoDto dto = new RentalInfoDto();
		dto.setSerial(info.getSerial());
		dto.setHandleType(info.getHandleType());
		dto.setRemark(info.getRemark());
		dto.setUpdateUserId(info.getUpdateUserId());

		// 插入租赁合同操作记录表
		rentalDao.insertContractUpdateHistroy(dto);
	}

	/**
	 * 更新市场租赁合同信息表
	 */
	public void updateContractInfo(RentalContractInfo info, String serial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		RentalInfoDto dto = new RentalInfoDto();
		dto = setDtoFromEntity(dto, info);
		// 更新市场租赁合同信息表
		rentalDao.updateContractInfo(dto);
	}

	/**
	 * 更新市场租赁合同状态
	 */
	public void updateContractStatus(RentalContractInfo info) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		RentalInfoDto dto = new RentalInfoDto();
		dto = setDtoFromEntity(dto, info);
		// 更新市场租赁合同状态
		rentalDao.updateContractStatus(dto);
	}

	/**
	 * 判断合同编号是否存在
	 */
	public boolean isExistRentalLocationBySerial(String serial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 判断合同编号是否存在
		boolean result = rentalDao.isExistRentalLocationBySerial(serial);
		return result;
	}

	/**
	 * 同一个租位的租期是否重叠check
	 */
	public List<RentalInfoDto> checkLocationStartDate(String locationSerial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 同一个租位的租期是否重叠check
		List<RentalInfoDto> rentalInfoDto = rentalDao.checkLocationStartDate(locationSerial);
		return rentalInfoDto;
	}

	/**
	 * 判断租位是否被使用
	 */
	public boolean checkLocationSerialUsed(String serial, String locationSerial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 判断租位是否被使用
		boolean result = rentalDao.checkLocationSerialUsed(serial, locationSerial);
		return result;
	}

	/**
	 * 查询合同状态
	 */
	public int searchStatusById(long id) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 查询合同状态
		int status = rentalDao.searchStatusById(id);
		return status;
	}

	/**
	 * 查询租位合同信息
	 */
	public List<RentalContractInfo> searchRentalContractInfo(String serial, String locationSerial, String ownerName,
			String status, String startDateS, String startDateE, String endDateS, String endDateE, int rentalArea)
			throws TmsDaoException {

		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO, getPageNo(),
				getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) rentalDao, TmsDao.TMS_CONTRACT_INFO);

		// 合同信息list
		List<RentalInfoDto> list = rentalDao.searchRentalContractInfo(serial, locationSerial, ownerName, status,
				startDateS, startDateE, endDateS, endDateE, rentalArea);
		List<RentalContractInfo> contractList = new ArrayList<RentalContractInfo>();
		if (null != list && list.size() > 0) {
			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				rentalContractInfo = setDtoTransformInfo(list.get(i));
				contractList.add(rentalContractInfo);
			}
		}
		setPagingInfo(idao);
		return contractList;
	}

	/**
	 * 查询租位合同信息操作记录
	 */
	public List<RentalContractInfo> searchRentalContractUpdateHistroy(String serial, String handleName,
			String handleType, String handleDateS, String handleDateE) throws TmsDaoException {

		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO, getPageNo(),
				getMaxIndex(), getSortKey(), isAsc());
		ViewListDao idao = (ViewListDao) TmsDao.getViewListDao((TmsDao) rentalDao, TmsDao.TMS_CONTRACT_INFO);

		// 合同信息list
		List<RentalInfoDto> list = rentalDao.searchRentalContractUpdateHistroy(serial, handleName, handleType,
				handleDateS, handleDateE);
		List<RentalContractInfo> contractUpdateHistroyList = new ArrayList<RentalContractInfo>();
		if (null != list && list.size() > 0) {
			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				rentalContractInfo = setUpdateHistroyDtoTransformInfo(list.get(i));
				contractUpdateHistroyList.add(rentalContractInfo);
			}
		}
		setPagingInfo(idao);
		return contractUpdateHistroyList;
	}

	/**
	 * 查询租位合同信息操作记录
	 */
	public List<RentalContractInfo> searchRentalContractUpdateHistroyNopage(String serial, String handleName,
			String handleType, String handleDateS, String handleDateE) throws TmsDaoException {

		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);

		// 合同信息list
		List<RentalInfoDto> list = rentalDao.searchRentalContractUpdateHistroy(serial, handleName, handleType,
				handleDateS, handleDateE);
		List<RentalContractInfo> contractUpdateHistroyList = new ArrayList<RentalContractInfo>();
		if (null != list && list.size() > 0) {
			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				rentalContractInfo = setUpdateHistroyDtoTransformInfo(list.get(i));
				contractUpdateHistroyList.add(rentalContractInfo);
			}
		}

		return contractUpdateHistroyList;
	}

	/**
	 * 查询合同详细信息
	 */
	public RentalContractInfo searchRentalContractDetailInfo(long id) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 合同详细信息
		RentalInfoDto dto = rentalDao.searchRentalContractDetailInfo(id);
		return setDtoTransformInfo(dto);
	}

	/**
	 * 查询合同详细信息
	 */
	public RentalContractInfo searchRentalContractDetailInfoBySerial(String serial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 合同详细信息
		RentalInfoDto dto = rentalDao.searchRentalContractDetailInfoBySerial(serial);
		return setDtoTransformInfo(dto);
	}

	/**
	 * 查询租位合同
	 */
	public List<RentalContractInfo> searchRentalContractInfoByLocationSerial(String locationSerial)
			throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		// 合同详细信息
		List<RentalInfoDto> dto = rentalDao.searchRentalContractInfoByLocationSerial(locationSerial);
		return setDtoListTransformInfoList(dto);
	}

	/**
	 * 
	 * 模糊查询合同编号列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<RentalContractInfo> findCarProxySerialList(String query) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);

		List<RentalInfoDto> list = rentalDao.findSerialList(query);
		List<RentalContractInfo> contractInfoList = new ArrayList<RentalContractInfo>();

		if (null != list && list.size() > 0) {

			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				RentalInfoDto rentalInfoDto = list.get(i);
				rentalContractInfo.setId(rentalInfoDto.getId());
				rentalContractInfo.setSerial(rentalInfoDto.getSerial());
				contractInfoList.add(rentalContractInfo);
			}
		}

		return contractInfoList;
	}

	/**
	 * 
	 * 模糊查询合同编号列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<RentalContractInfo> findContractSerialList(String query) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);

		List<RentalInfoDto> list = rentalDao.findSerialInfoList(query);
		List<RentalContractInfo> contractInfoList = new ArrayList<RentalContractInfo>();

		if (null != list && list.size() > 0) {

			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				RentalInfoDto rentalInfoDto = list.get(i);
				rentalContractInfo.setId(rentalInfoDto.getId());
				rentalContractInfo.setSerial(rentalInfoDto.getSerial());
				contractInfoList.add(rentalContractInfo);
			}
		}

		return contractInfoList;
	}

	/**
	 * 
	 * 模糊查询合同人姓名列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<RentalContractInfo> findOwnerNameList(String query) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);

		List<RentalInfoDto> list = rentalDao.findOwnerNameList(query);
		List<RentalContractInfo> contractInfoList = new ArrayList<RentalContractInfo>();

		if (null != list && list.size() > 0) {

			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				RentalInfoDto rentalInfoDto = list.get(i);
				rentalContractInfo.setId(rentalInfoDto.getId());
				rentalContractInfo.setOwnerName(rentalInfoDto.getOwnerName());
				contractInfoList.add(rentalContractInfo);
			}
		}

		return contractInfoList;
	}

	/**
	 * 
	 * 模糊查询合同人姓名列表
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public List<RentalContractInfo> findHandleNameList(String query) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);

		List<RentalInfoDto> list = rentalDao.findHandleNameList(query);
		List<RentalContractInfo> contractInfoList = new ArrayList<RentalContractInfo>();

		if (null != list && list.size() > 0) {

			for (int i = 0; i < list.size(); i++) {
				RentalContractInfo rentalContractInfo = new RentalContractInfo();
				RentalInfoDto rentalInfoDto = list.get(i);
				rentalContractInfo.setId(rentalInfoDto.getId());
				rentalContractInfo.setHandleName(rentalInfoDto.getHandleName());
				contractInfoList.add(rentalContractInfo);
			}
		}

		return contractInfoList;
	}

	/**
	 * 
	 * 查询合同租位信息
	 * 
	 * @return
	 * @throws TmsDaoException
	 */
	public RentalContractInfo findContractInfoBySerial(String serial) throws TmsDaoException {
		RentalContractDao rentalDao = (RentalContractDao) TmsDao.getInstance(TmsDao.TMS_CONTRACT_INFO);
		RentalInfoDto dto = rentalDao.findContractInfoBySerial(serial);
		Codes code = Codes.getInstance();
		RentalContractInfo contractInfo = new RentalContractInfo();
		contractInfo.setSerial(dto.getSerial());
		contractInfo.setLocationSerial(dto.getLocationSerial());
		contractInfo.setLocationType(code.getItemValueByItemIdAndItemCode(Codes.RENTAL_TYPE, dto.getRentalType()));
		contractInfo.setRentalAcreage(StringUtil.getPointBetweenThree(dto.getAcreage()));
		contractInfo.setRentalCarPort(StringUtil.getPointBetweenThree(dto.getCarPort()));
		contractInfo.setAddress(dto.getAddress());
		contractInfo.setRentalArea(dto.getArea());
		contractInfo.setAnnualTransactionVolume(dto.getAnnualTransactionVolume());
		contractInfo.setRentalAreaName(code.getItemValueByItemIdAndItemCode(Codes.RENTAL_AREA, dto.getArea()));
		SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd");
		if (dto.getStartDate() != null) {
			contractInfo.setStartTime(fm.format(dto.getStartDate()));
		}
		if (dto.getEndDate() != null) {
			contractInfo.setEndTime(fm.format(dto.getEndDate()));
		}

		return contractInfo;
	}

	public List<RentalContractInfo> setDtoListTransformInfoList(List<RentalInfoDto> rentalInfoDtoList)
			throws TmsDaoException {
		List<RentalContractInfo> rentalContractInfoList = new ArrayList<RentalContractInfo>();

		if (rentalInfoDtoList != null && rentalInfoDtoList.size() > 0) {
			for (int i = 0; i < rentalInfoDtoList.size(); i++) {
				RentalContractInfo rentalContractInfo = setDtoTransformInfo(rentalInfoDtoList.get(i));
				if (i % 2 == 0) {
					rentalContractInfo.setCssFlag(1);
				} else {
					rentalContractInfo.setCssFlag(2);
				}
				int num = (i + 1) + (getPageNo() - 1) * 20;
				rentalContractInfo.setRowNo(num);

				rentalContractInfoList.add(rentalContractInfo);
			}
		}

		return rentalContractInfoList;
	}

	/**
	 * 从dto向Entity赋值
	 * 
	 * @param marketCarInfoDto
	 * @param car
	 * @return
	 */
	public RentalContractInfo setDtoTransformInfo(RentalInfoDto rentalInfoDto) throws TmsDaoException {
		RentalContractInfo contractInfo = new RentalContractInfo();
		Codes code = Codes.getInstance();
		contractInfo.setId(rentalInfoDto.getId());
		contractInfo.setSerial(rentalInfoDto.getSerial());
		contractInfo.setRent(rentalInfoDto.getRent());
		contractInfo.setStartDate(rentalInfoDto.getStartDate());
		contractInfo.setEndDate(rentalInfoDto.getEndDate());
		contractInfo.setLocationSerial(rentalInfoDto.getLocationSerial());
		contractInfo.setRentalArea(rentalInfoDto.getArea());
		contractInfo
				.setRentalAreaName(code.getItemValueByItemIdAndItemCode(Codes.RENTAL_AREA, rentalInfoDto.getArea()));
		// 合同人信息
		contractInfo.setOwnerName(rentalInfoDto.getOwnerName());
		contractInfo.setOwnerIdCardNo(rentalInfoDto.getOwnerIdCardNo());
		contractInfo.setOwnerSex(rentalInfoDto.getOwnerSex());
		contractInfo.setOwnerBirthday(rentalInfoDto.getOwnerBirthday());
		contractInfo.setOwnerPhone(rentalInfoDto.getOwnerPhone());
		contractInfo.setOwnerAddress(rentalInfoDto.getOwnerAddress());
		contractInfo.setRemark(rentalInfoDto.getRemark());
		// 图片信息
		contractInfo.setPhoto_1(rentalInfoDto.getPhoto1());
		contractInfo.setPhoto_2(rentalInfoDto.getPhoto2());
		contractInfo.setPhoto_3(rentalInfoDto.getPhoto3());
		contractInfo.setPhoto_4(rentalInfoDto.getPhoto4());
		contractInfo.setPhoto_5(rentalInfoDto.getPhoto5());
		contractInfo.setPhoto_6(rentalInfoDto.getPhoto6());
		contractInfo.setPhoto_7(rentalInfoDto.getPhoto7());
		contractInfo.setPhoto_8(rentalInfoDto.getPhoto8());
		contractInfo.setInsertUserId(rentalInfoDto.getInsertUserId());
		contractInfo.setUpdateUserId(rentalInfoDto.getUpdateUserId());
		contractInfo.setInsertTime(rentalInfoDto.getInsertTime());
		contractInfo.setUpdateTime(rentalInfoDto.getUpdateTime());
		contractInfo.setStatus(rentalInfoDto.getStatus());
		contractInfo.setContractStatus(
				code.getItemValueByItemIdAndItemCode(Codes.CONTRACT_STATUS, rentalInfoDto.getStatus()));
		contractInfo.setRowNo(rentalInfoDto.getRowNo());
		contractInfo.setCssFlag(rentalInfoDto.getCssFlag());
		contractInfo.setId(rentalInfoDto.getId());
		contractInfo.setRentalArea(rentalInfoDto.getArea());

		return contractInfo;
	}

	/**
	 * 从dto向Entity赋值
	 * 
	 * @param marketCarInfoDto
	 * @param car
	 * @return
	 */
	public RentalContractInfo setUpdateHistroyDtoTransformInfo(RentalInfoDto rentalInfoDto) throws TmsDaoException {
		RentalContractInfo contractInfo = new RentalContractInfo();
		contractInfo.setId(rentalInfoDto.getId());
		contractInfo.setSerial(rentalInfoDto.getSerial());
		contractInfo.setHandleType(rentalInfoDto.getHandleType());
		contractInfo.setRemark(rentalInfoDto.getRemark());
		contractInfo.setHandleName(rentalInfoDto.getHandleName());
		contractInfo.setHandleDate(DateUtil.getDateByTimeStampHM(rentalInfoDto.getHandleDate()));
		contractInfo.setRowNo(rentalInfoDto.getRowNo());
		contractInfo.setCssFlag(rentalInfoDto.getCssFlag());
		return contractInfo;
	}

	/**
	 * 从Entity向dto赋值
	 * 
	 * @param marketCarInfoDto
	 * @param car
	 * @return
	 */
	private RentalInfoDto setDtoFromEntity(RentalInfoDto rentalInfoDto, RentalContractInfo contractInfo) {
		rentalInfoDto.setId(contractInfo.getId());
		rentalInfoDto.setSerial(contractInfo.getSerial());
		rentalInfoDto.setStatus(contractInfo.getStatus());
		rentalInfoDto.setRent(contractInfo.getRent());
		rentalInfoDto.setStartDate(contractInfo.getStartDate());
		rentalInfoDto.setEndDate(contractInfo.getEndDate());
		rentalInfoDto.setLocationSerial(contractInfo.getLocationSerial());
		// 合同人信息
		rentalInfoDto.setOwnerName(contractInfo.getOwnerName());
		rentalInfoDto.setOwnerIdCardNo(contractInfo.getOwnerIdCardNo());
		rentalInfoDto.setOwnerSex(contractInfo.getOwnerSex());
		rentalInfoDto.setOwnerBirthday(contractInfo.getOwnerBirthday());
		rentalInfoDto.setOwnerPhone(contractInfo.getOwnerPhone());
		rentalInfoDto.setOwnerAddress(contractInfo.getOwnerAddress());
		rentalInfoDto.setRemark(contractInfo.getRemark());
		// 图片信息
		rentalInfoDto.setPhoto1(contractInfo.getPhoto_1());
		rentalInfoDto.setPhoto2(contractInfo.getPhoto_2());
		rentalInfoDto.setPhoto3(contractInfo.getPhoto_3());
		rentalInfoDto.setPhoto4(contractInfo.getPhoto_4());
		rentalInfoDto.setPhoto5(contractInfo.getPhoto_5());
		rentalInfoDto.setPhoto6(contractInfo.getPhoto_6());
		rentalInfoDto.setPhoto7(contractInfo.getPhoto_7());
		rentalInfoDto.setPhoto8(contractInfo.getPhoto_8());
		rentalInfoDto.setInsertUserId(contractInfo.getInsertUserId());
		rentalInfoDto.setUpdateUserId(contractInfo.getUpdateUserId());
		rentalInfoDto.setInsertTime(contractInfo.getInsertTime());
		rentalInfoDto.setUpdateTime(contractInfo.getUpdateTime());
		return rentalInfoDto;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	public String getSerial() {
		return serial;
	}

	public void setRent(int rent) {
		this.rent = rent;
	}

	public int getRent() {
		return rent;
	}

	public void setLocationSerial(String locationSerial) {
		this.locationSerial = locationSerial;
	}

	public String getLocationSerial() {
		return locationSerial;
	}

	public void setStartDate(Timestamp startDate) {
		this.startDate = startDate;
	}

	public Timestamp getStartDate() {
		return startDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}

	public Timestamp getEndDate() {
		return endDate;
	}

	public void setOwnerName(String ownerName) {
		this.ownerName = ownerName;
	}

	public String getOwnerName() {
		return ownerName;
	}

	public void setOwnerSex(int ownerSex) {
		this.ownerSex = ownerSex;
	}

	public int getOwnerSex() {
		return ownerSex;
	}

	public void setOwnerBirthday(Timestamp ownerBirthday) {
		this.ownerBirthday = ownerBirthday;
	}

	public Timestamp getOwnerBirthday() {
		return ownerBirthday;
	}

	public void setOwnerPhone(String ownerPhone) {
		this.ownerPhone = ownerPhone;
	}

	public String getOwnerPhone() {
		return ownerPhone;
	}

	public void setOwnerAddress(String ownerAddress) {
		this.ownerAddress = ownerAddress;
	}

	public String getOwnerAddress() {
		return ownerAddress;
	}

	public void setOwnerIdCardNo(String ownerIdCardNo) {
		this.ownerIdCardNo = ownerIdCardNo;
	}

	public String getOwnerIdCardNo() {
		return ownerIdCardNo;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRemark() {
		return remark;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getStatus() {
		return status;
	}

	public void setInsertTime(Timestamp insertTime) {
		this.insertTime = insertTime;
	}

	public Timestamp getInsertTime() {
		return insertTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setInsertUserId(int insertUserId) {
		this.insertUserId = insertUserId;
	}

	public int getInsertUserId() {
		return insertUserId;
	}

	public void setUpdateUserId(int updateUserId) {
		this.updateUserId = updateUserId;
	}

	public int getUpdateUserId() {
		return updateUserId;
	}

	public void setRentalType(int rentalType) {
		this.rentalType = rentalType;
	}

	public int getRentalType() {
		return rentalType;
	}

	public void setAcreage(int acreage) {
		this.acreage = acreage;
	}

	public int getAcreage() {
		return acreage;
	}

	public void setCarPort(int carPort) {
		this.carPort = carPort;
	}

	public int getCarPort() {
		return carPort;
	}

	public void setPhoto_1(String photo_1) {
		this.photo_1 = photo_1;
	}

	public String getPhoto_1() {
		return photo_1;
	}

	public void setPhoto_2(String photo_2) {
		this.photo_2 = photo_2;
	}

	public String getPhoto_2() {
		return photo_2;
	}

	public void setPhoto_3(String photo_3) {
		this.photo_3 = photo_3;
	}

	public String getPhoto_3() {
		return photo_3;
	}

	public void setPhoto_4(String photo_4) {
		this.photo_4 = photo_4;
	}

	public String getPhoto_4() {
		return photo_4;
	}

	public void setPhoto_5(String photo_5) {
		this.photo_5 = photo_5;
	}

	public String getPhoto_5() {
		return photo_5;
	}

	public void setPhoto_6(String photo_6) {
		this.photo_6 = photo_6;
	}

	public String getPhoto_6() {
		return photo_6;
	}

	public void setPhoto_7(String photo_7) {
		this.photo_7 = photo_7;
	}

	public String getPhoto_7() {
		return photo_7;
	}

	public void setPhoto_8(String photo_8) {
		this.photo_8 = photo_8;
	}

	public String getPhoto_8() {
		return photo_8;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getId() {
		return id;
	}

	public void setContractStatus(String contractStatus) {
		this.contractStatus = contractStatus;
	}

	public String getContractStatus() {
		return contractStatus;
	}

	public void setRowNo(int rowNo) {
		this.rowNo = rowNo;
	}
    
	public String getAnnualTransactionVolume() {
		return annualTransactionVolume;
	}

	public void setAnnualTransactionVolume(String annualTransactionVolume) {
		this.annualTransactionVolume = annualTransactionVolume;
	}

	public int getRowNo() {
		return rowNo;
	}

	public void setCssFlag(int cssFlag) {
		this.cssFlag = cssFlag;
	}

	public int getCssFlag() {
		return cssFlag;
	}

	/**
	 * @param locationType
	 *            the locationType to set
	 */
	public void setLocationType(String locationType) {
		this.locationType = locationType;
	}

	/**
	 * @return the locationType
	 */
	public String getLocationType() {
		return locationType;
	}

	/**
	 * @param address
	 *            the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return the address
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param startTime
	 *            the startTime to set
	 */
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	/**
	 * @return the startTime
	 */
	public String getStartTime() {
		return startTime;
	}

	/**
	 * @param endTime
	 *            the endTime to set
	 */
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	/**
	 * @return the endTime
	 */
	public String getEndTime() {
		return endTime;
	}

	/**
	 * @param num
	 *            the num to set
	 */
	public void setNum(int num) {
		this.num = num;
	}

	/**
	 * @return the num
	 */
	public int getNum() {
		return num;
	}

	/**
	 * @param rentalAcreage
	 *            the rentalAcreage to set
	 */
	public void setRentalAcreage(String rentalAcreage) {
		this.rentalAcreage = rentalAcreage;
	}

	/**
	 * @return the rentalAcreage
	 */
	public String getRentalAcreage() {
		return rentalAcreage;
	}

	/**
	 * @param rentalCarPort
	 *            the rentalCarPort to set
	 */
	public void setRentalCarPort(String rentalCarPort) {
		this.rentalCarPort = rentalCarPort;
	}

	/**
	 * @return the rentalCarPort
	 */
	public String getRentalCarPort() {
		return rentalCarPort;
	}

	public void setRentalArea(int rentalArea) {
		this.rentalArea = rentalArea;
	}

	public int getRentalArea() {
		return rentalArea;
	}

	public void setHandleType(int handleType) {
		this.handleType = handleType;
	}

	public int getHandleType() {
		return handleType;
	}

	public void setHandleName(String handleName) {
		this.handleName = handleName;
	}

	public String getHandleName() {
		return handleName;
	}

	public void setHandleDate(String handleDate) {
		this.handleDate = handleDate;
	}

	public String getHandleDate() {
		return handleDate;
	}

	public void setHandleTypeName(String handleTypeName) {
		this.handleTypeName = handleTypeName;
	}

	public String getHandleTypeName() {
		return handleTypeName;
	}

	public void setRentalAreaName(String rentalAreaName) {
		this.rentalAreaName = rentalAreaName;
	}

	public String getRentalAreaName() {
		return rentalAreaName;
	}
}
